<template>
  <div>
    
    <!-- <el-breadcrumb style=" font-size: 13px; " separator-class="el-icon-arrow-right">
      <el-breadcrumb-item >库存管理</el-breadcrumb-item>
      <el-breadcrumb-item>客户化设置</el-breadcrumb-item>
      <el-breadcrumb-item>库存地址分配设置</el-breadcrumb-item>
      <el-breadcrumb-item style="color: 000000;">II级产品存储区域</el-breadcrumb-item>
    </el-breadcrumb> -->

    <el-container
      style="height: 523px; overflow: hidden; background: white; border:1px solid white ; border-radius: 12px; margin-top: 10px;">
      <div style="margin-left: 4%;margin-top:10px;">
        <template>
          <el-table :data="tableData" style="width: 100%; height: 426px;  display: block;">
            <el-table-column prop="date" label="库存编号" width="165">
            </el-table-column>
            <el-table-column prop="name" label="产品分类" width="180">
            </el-table-column>
            <el-table-column prop="name" label="库房名称" width="120">
            </el-table-column>
            <el-table-column prop="name" label="I级存储区域" width="120">
            </el-table-column>
            <el-table-column prop="name" label="II级存储区域" width="120">
            </el-table-column>
            <el-table-column label="操作">
              <template slot-scope="scope">
                <el-button type="danger" size="mini" @click="dialogFormVisible = true " round>增加</el-button>
              </template>
            </el-table-column>
            <el-table-column label="释放">
              <template slot-scope="scope">
                <el-button type="danger" size="mini" @click="handleDelete(scope.row)" round>释放</el-button>
              </template>
            </el-table-column>
          </el-table>
          <div class="block" style="display: block; margin-top: 15px;">
            <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
              :current-page="11" :page-sizes="[100, 200, 300, 400]" :page-size="100"
              layout="total, sizes, prev, pager, next, jumper" :total="400">
            </el-pagination>
          </div>
        </template>
      </div>
    </el-container>

    <el-dialog title="I级产品分类" :visible.sync="dialogFormVisible">
      <el-form :model="form">
        <el-form-item label="I级产品分类" :label-width="formLabelWidth">
          <el-input v-model="form.name" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item label="请选择库房" :label-width="formLabelWidth">
          <el-select>
             <el-option>成品库</el-option>
          </el-select>
        </el-form-item>

      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button     @click="dialogFormVisible = false">取 消</el-button>
        <el-button   type="primary" @click="dialogFormVisible = false">确 定</el-button>
      </div>
    </el-dialog>

  </div>
</template>

<script>
  export default {
    name: 'repii',
    data() {
      return {
        tableData: [{
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-04',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1517 弄'
        }, {
          date: '2016-05-01',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1519 弄'
        }, {
          date: '2016-05-03',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1516 弄'
        }, {
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-04',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1517 弄'
        }, {
          date: '2016-05-01',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1519 弄'
        }],
        gridData: [{
                  date: '2016-05-02',
                  name: '王小虎',
                  address: '上海市普陀区金沙江路 1518 弄'
                }, {
                  date: '2016-05-04',
                  name: '王小虎',
                  address: '上海市普陀区金沙江路 1518 弄'
                }, {
                  date: '2016-05-01',
                  name: '王小虎',
                  address: '上海市普陀区金沙江路 1518 弄'
                }, {
                  date: '2016-05-03',
                  name: '王小虎',
                  address: '上海市普陀区金沙江路 1518 弄'
                }],
                dialogTableVisible: false,
                dialogFormVisible: false,
                form: {
                  name: '',
                  region: '',
                  date1: '',
                  date2: '',
                  delivery: false,
                  type: [],
                  resource: '',
                  desc: ''
                },
                formLabelWidth: '120px'
      }
    },
    methods: {
      tableRowClassName({
        row,
        rowIndex
      }) {
        if (rowIndex === 1) {
          return 'warning-row';
        } else if (rowIndex === 3) {
          return 'success-row';
        }
        return '';
      },
      handleSizeChange(val) {
        console.log(`每页 ${val} 条`);
      },
      handleCurrentChange(val) {
        console.log(`当前页: ${val}`);
      }
    }
  }
</script>

<style scoped="scoped">
  * {
    padding: 0px;
    margin: 0px;
  }

  .el-breadcrumb__inner {
    color: black;

  }

  .el-table .warning-row {
    background: oldlace;
  }

  .el-table .success-row {
    background: #f0f9eb;
  }

  .el-breadcrumb__item:last-child .el-breadcrumb__inner,
  .el-breadcrumb__item:last-child .el-breadcrumb__inner a,
  .el-breadcrumb__item:last-child .el-breadcrumb__inner a:hover,
  .el-breadcrumb__item:last-child .el-breadcrumb__inner:hover {
    font-weight: 400;
    color: black;
    cursor: text;
  }
</style>
